In computer graphics, the use of raster image processors (RIPs) is well known. Raster image processors are specialized processors that operate on arrays or matrices of bits, rapidly convolving or otherwise manipulating the bits as required for the generation of computer graphics. RIPs accept, as input, a sequence of instructions which resemble the instructions used by more common processors. Like other computer instructions, these instructions include an operation code. RIP instructions also include two or three operands. In two-operand systems, processing proceeds by possibly reading a source operand, possibly reading a destination operand, performing the requested operation, and writing the result into the destination operand. In three operand systems, processing proceeds by possibly reading a first source operand, possibly reading a second source operand, possibly reading a destination operand, performing the requested operation, and writing the result into the destination operand.
Predictably, a number of different RIPs are commonly used. These different RIPs use different instruction sets with some using two operands and others using three operand formats. One result of the diversity in RIPs has been the development of Application Program Interfaces, or APIs, for computer graphics. Graphics APIs are sets of standardized routines which, when called, perform graphics functions. Programmer's write their programs to call the functions in the API and the API performs the work of ensuring the correct instructions are passed to the RIP.
Unfortunately, some of the differences in RIPs are also reflected at the API level. For example, Microsoft provides an API for the Microsoft Windows Product. This API specifies 256 different graphics operations, each of which take three operands. Such an API is relatively straightforward to implement when the underlying RIP supports all 256 different graphics operations and supports the use of three-operands. In cases where an RIP implements only a smaller number of operations or supports a smaller number of operands, implementation of the Microsoft API may be problematic.
As a result there is a need for a generalized approach for executing three-operand raster operations in two-operand raster environments. There is also a need for supporting APIs which have a large number of different graphics operations in graphics environments which include a smaller number of graphics operations.